package iwpl.project.entities;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Vehicles entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Vehicles")
public class Vehicles implements java.io.Serializable {

	// Fields

	private Integer id;
	private Customers customers;
	private Timestamp registryDate;
	private Timestamp cancelDate;
	private String parkingPlace;
	private String type;

	// Constructors

	/** default constructor */
	public Vehicles() {
	}

	/** minimal constructor */
	public Vehicles(Integer id) {
		this.id = id;
	}

	/** full constructor */
	public Vehicles(Integer id, Customers customers, Timestamp registryDate,
			Timestamp cancelDate, String parkingPlace, String type) {
		this.id = id;
		this.customers = customers;
		this.registryDate = registryDate;
		this.cancelDate = cancelDate;
		this.parkingPlace = parkingPlace;
		this.type = type;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CustomerID")
	public Customers getCustomers() {
		return this.customers;
	}

	public void setCustomers(Customers customers) {
		this.customers = customers;
	}

	@Column(name = "RegistryDate", length = 16)
	public Timestamp getRegistryDate() {
		return this.registryDate;
	}

	public void setRegistryDate(Timestamp registryDate) {
		this.registryDate = registryDate;
	}

	@Column(name = "CancelDate", length = 16)
	public Timestamp getCancelDate() {
		return this.cancelDate;
	}

	public void setCancelDate(Timestamp cancelDate) {
		this.cancelDate = cancelDate;
	}

	@Column(name = "ParkingPlace")
	public String getParkingPlace() {
		return this.parkingPlace;
	}

	public void setParkingPlace(String parkingPlace) {
		this.parkingPlace = parkingPlace;
	}

	@Column(name = "Type")
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

}